/*
 * @Author: chendeji
 * @Date: 2021-11-18 12:39:36
 * @LastEditTime: 2021-11-18 12:39:50
 * @Description: 
 * @FilePath: \copy_gsy_github_app_flutter\lib\common\model\Notification.dart
 * 联系方式：
 * wx: melody_2009
 * qq: 7815171323 
 */
import 'package:json_annotation/json_annotation.dart';

import 'NotificationSubject.dart';
import 'Repository.dart';

/**
 * Created by guoshuyu
 * Date: 2018-07-31
 */

part 'Notification.g.dart';

@JsonSerializable()
class Notification {
  String? id;
  bool? unread;
  String? reason;
  @JsonKey(name: "updated_at")
  DateTime? updateAt;
  @JsonKey(name: "last_read_at")
  DateTime? lastReadAt;
  Repository? repository;
  NotificationSubject? subject;

  Notification(this.id, this.unread, this.reason, this.updateAt,
      this.lastReadAt, this.repository, this.subject);

  factory Notification.fromJson(Map<String, dynamic> json) =>
      _$NotificationFromJson(json);

  Map<String, dynamic> toJson() => _$NotificationToJson(this);
}
